package file.basic;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-10-29
 * Time: 19:55
 */

public class Demo3 {
    public static void main(String[] args) throws IOException {
        //文件的创建和删除
        File f = new File("./text");
        System.out.println(f.exists());
        System.out.println("创建文件");
        f.createNewFile();
        System.out.println("创建文件结束");
        System.out.println(f.exists());
        System.out.println("删除文件");
        f.delete();
    }
}
